package net.wangds.auth.resource.service;

import net.wangds.auth.resource.comp.GeneralMenuComp;
import net.wangds.auth.resource.comp.GeneralResourceComp;
import net.wangds.auth.resource.entity.GeneralResourceEntity;
import net.wangds.jpa.service.AbstractJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuService extends AbstractJpaService<GeneralResourceEntity, GeneralMenuComp> {

    @Autowired
    private GeneralMenuComp mmCmpMenu;

    @Override
    protected GeneralMenuComp fetchJpaComp() {
        return mmCmpMenu;
    }


    public List<GeneralResourceEntity> listAllMenus(String system){
        return mmCmpMenu.findMenus(system);
    }

}
